#include<iostream>
#include<string>
using namespace std;
int main()
{
	string ret, cur, str;
	cin >> str;
	for (int i = 0; i <= str.length(); i++)
	{
		if (str[i]>='0' && str[i] <= '9')
		{
			cur += str[i];
		}
		else
		{
			if (cur.length() > ret.length())
			{
				ret = cur;
				cur.clear();
			}
			else
			{
				cur.clear();
			}
		}
	}
	cout << ret;
	return 0;
}